package com.example.chatchatbackend.entity.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 丁真
 * @since 2024-10-28 05:03:47
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("db_roboot")
public class Roboot implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 机器人名称
     */
    private String name;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 所属成员
     */
    private Integer userId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updatedTime;

    private String userName;


    public Roboot(Integer id, String name, String avatar, Integer userId, LocalDateTime createdTime, LocalDateTime updatedTime) {
        this.id = id; // 赋值 id
        this.name = name; // 赋值 name
        this.avatar = avatar; // 赋值 avatar
        this.userId = userId; // 赋值 userId
        this.createdTime = createdTime; // 赋值 createdTime
        this.updatedTime = updatedTime; // 赋值 updatedTime
    }
}
